-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: replace notes with background in generated examples #11516
Conversation
- Addon notes is deprecated and should not be used anymore.
text: 'Defined via addon-backgrounds!', | ||
}; | ||
|
||
WithCustomBackground.storyName = 'With custom background'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question, will remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shilman would you like me to remove the same for ButtonWithLinkToAnotherStory
?
Emoji.parameters = { notes: 'My notes on a button with emojis' }; | ||
export const WithCustomBackground = Template.bind({}); | ||
WithCustomBackground.args = { | ||
text: 'Defined via addon-backgrounds!', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we just make a story called Inverse
that:
- Inverts the button background
- Inverts the story background
I think this would fit well into the new template. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Is this still being worked on? |
Things have changed a lot since then, I don't think this is necessary anymore, as notes have already been removed with the new CLI files (button/page/header) and also backgrounds has presets now. As a result I'll be closing this PR. Still, it might be good to add an example of parameters usage, like @shilman mentioned earlier like having one of the button stories setting the background and inverting the color. If that is still desired I can open a new PR with that feature! |
Issue: #10796
What I did
In this PR I introduce two things, done together for convenience:
1 - Removal of notes addon, given that it's deprecated in favor of docs.
2 - Addition of backgrounds usage so we can still have a story using parameters.
How to test
Modify
scripts/run-e2e.ts
underinitStorybook
:Then run:
From there you can access http://localhost:4000/?path=/story/button--with-custom-background and see it.
Yes